package com.yxh.www.author.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统账户接口关系
 * </p>
 *
 * @author Yangxiaohui
 * @since 2020-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmAccountApiRelation extends Model<SmAccountApiRelation> {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 账户ID
     */
    @TableField("account_id")
    private String accountId;

    /**
     * 接口ID
     */
    @TableField("api_id")
    private String apiId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    public SmAccountApiRelation() {
    }

    public SmAccountApiRelation(String accountId, String apiId) {
        this.accountId = accountId;
        this.apiId = apiId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
